'use strict';

module.exports = app => {
  const { STRING, INTEGER, TINYINT, TEXT } = app.Sequelize;

  const Article = app.model.define('article', {
    id: {
      type: INTEGER,
      primaryKey: true,
      autoIncrement: true,
    },
    type_id: TINYINT,
    title: STRING(255),
    desc: STRING(255),
    thumb: STRING(255),
    content: TEXT,
    create_time: INTEGER,
    create_uid: INTEGER,
    update_time: INTEGER,
    status: TINYINT,
    delete_time: INTEGER,
  });

  return Article;
};
